package io.renren.controller;

import io.renren.service.MapService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;

@RestController
@RequestMapping("/api")
@Api(tags = "地图接口")
public class MapController {
    @Autowired
    private MapService mapService;

    @GetMapping("/searchstartend")
    public String searchStartEnd(@RequestParam("start") String start, @RequestParam("end") String end)
            throws IOException, KeyManagementException, NoSuchAlgorithmException {
        return mapService.searchStartEnd(start, end);
    }
}
